The present invention relates to a semiconductor apparatus capable of facilitating elimination of a bug in software of a microcomputer having a mask ROM mounted therein.
In eliminating a software bug in a microcomputer having a mask ROM mounted therein, it is generally practiced to revise the program area by changing the mask ROM. A conventional method taken as a countermeasure against a bug in software in a microcomputer having a mask ROM mounted therein will be described.
In debugging software in a microcomputer having a mask ROM mounted therein, there has so far been used a method to fabricate the mask ROM anew or a method, having a portion of the program area of the mask ROM written into a nonvolatile memory external to the microcomputer, to rewrite the contents of the nonvolatile memory. A structure of a microcomputer is illustrated in FIG. 5. In FIG. 5, microcomputer 50 includes mask ROM 51 as a read-only memory of the program area, volatile memory RAM 52 as a data area, and CPU 53 as the central processing unit.
Heretofore, when a bug was present in a software portion of a microcomputer 50 having a mask ROM 51 mounted therein, elimination of the bug has been achieved by fabricating the mask ROM again or by writing a portion of the program area in the mask ROM 51 into a nonvolatile memory disposed external to the microcomputer.
As prior arts for removing a bug from a mask ROM, there are those disclosed in Japanese Patent Laid-open Nos. 10234/1988 and 192096/1989 and U.S. Pat. No. 5,479,342.
A semiconductor apparatus according to the present invention comprises:
a control unit including a mask ROM having a program area with programs stored therein, a rewritable memory having a data area with data for use in execution of the program stored therein, and a central processing unit; and
a storage unit for storing arbitrary data capable of rewriting an arbitrary data area in the memory. By virtue of the described arrangement, a bug in software can be eliminated without changing the mask ROM.
Another invention herein is a semiconductor apparatus comprising:
a control unit with first and second data written therein; and
a storage unit storing first and second mask data, comparison data, a source address, and a target address. Arbitrary data of the first and second mask data, the comparison data, the source address, and the target address are written into the storage unit, which has values xe2x80x9c0xe2x80x9d initially written therein. In the semiconductor apparatus, the first data is extracted in accordance with the source address, a first operation is performed on the first data and the first mask data, the result of the first operation is compared with the comparison data, the second data is extracted in accordance with the target address, a second operation is performed on the second data and the second mask data, and whether or not the result of the second operation is written into the second data is determined in accordance with the result of the comparison.
By virtue of the described arrangement, a software bug can be eliminated only by preparing a nonvolatile memory of a relatively small capacity and not requiring correction of the mask ROM.